package com.aaa.marketresearch.dataresource.service;

import com.aaa.marketresearch.dataresource.dao.BillContentDAO;
import com.aaa.marketresearch.dataresource.domain.BillContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Nail
 */

@Service
public class BillContentServiceImpl implements BillContentService{

    @Autowired
    private BillContentDAO billContentDAO;

    @Override
    public List<BillContent> getAll() {
        return billContentDAO.getAll();
    }

    @Override
    public BillContent getById(Integer id) {
        return billContentDAO.getById(id);
    }

    @Transactional
    @Override
    public void save(BillContent billContent) {
        billContentDAO.save(billContent);
    }

    @Transactional
    @Override
    public boolean delete(Integer id) {
        return billContentDAO.delete(id);
    }
}
